/*
 * XML Type:  one-to-one
 * Namespace: http://java.sun.com/xml/ns/persistence/orm
 * Java type: com.googlecode.horncomb.orm.jpa.v10.xmlbeans.OneToOne
 *
 * Automatically generated - do not modify.
 */
package com.googlecode.horncomb.orm.jpa.v10.xmlbeans.impl;
/**
 * An XML one-to-one(@http://java.sun.com/xml/ns/persistence/orm).
 *
 * This is a complex type.
 */
@SuppressWarnings("unchecked")
public class OneToOneImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.googlecode.horncomb.orm.jpa.v10.xmlbeans.OneToOne
{

    /**  */
	private static final long serialVersionUID = 9179218323122312325L;


	public OneToOneImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }

    private static final javax.xml.namespace.QName PRIMARYKEYJOINCOLUMN$0 =
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "primary-key-join-column");
    private static final javax.xml.namespace.QName JOINCOLUMN$2 =
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "join-column");
    private static final javax.xml.namespace.QName JOINTABLE$4 =
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "join-table");
    private static final javax.xml.namespace.QName CASCADE$6 =
        new javax.xml.namespace.QName("http://java.sun.com/xml/ns/persistence/orm", "cascade");
    private static final javax.xml.namespace.QName NAME$8 =
        new javax.xml.namespace.QName("", "name");
    private static final javax.xml.namespace.QName TARGETENTITY$10 =
        new javax.xml.namespace.QName("", "target-entity");
    private static final javax.xml.namespace.QName FETCH$12 =
        new javax.xml.namespace.QName("", "fetch");
    private static final javax.xml.namespace.QName OPTIONAL$14 =
        new javax.xml.namespace.QName("", "optional");
    private static final javax.xml.namespace.QName MAPPEDBY$16 =
        new javax.xml.namespace.QName("", "mapped-by");


    /**
     * Gets a List of "primary-key-join-column" elements
     */
    public java.util.List<com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn> getPrimaryKeyJoinColumnList()
    {
        final class PrimaryKeyJoinColumnList extends java.util.AbstractList<com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn>
        {
            public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn get(int i)
                { return OneToOneImpl.this.getPrimaryKeyJoinColumnArray(i); }

            public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn set(int i, com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn o)
            {
                com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn old = OneToOneImpl.this.getPrimaryKeyJoinColumnArray(i);
                OneToOneImpl.this.setPrimaryKeyJoinColumnArray(i, o);
                return old;
            }

            public void add(int i, com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn o)
                { OneToOneImpl.this.insertNewPrimaryKeyJoinColumn(i).set(o); }

            public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn remove(int i)
            {
                com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn old = OneToOneImpl.this.getPrimaryKeyJoinColumnArray(i);
                OneToOneImpl.this.removePrimaryKeyJoinColumn(i);
                return old;
            }

            public int size()
                { return OneToOneImpl.this.sizeOfPrimaryKeyJoinColumnArray(); }

        }

        synchronized (monitor())
        {
            check_orphaned();
            return new PrimaryKeyJoinColumnList();
        }
    }

    /**
     * Gets array of all "primary-key-join-column" elements
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn[] getPrimaryKeyJoinColumnArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(PRIMARYKEYJOINCOLUMN$0, targetList);
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn[] result = new com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }

    /**
     * Gets ith "primary-key-join-column" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn getPrimaryKeyJoinColumnArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn)get_store().find_element_user(PRIMARYKEYJOINCOLUMN$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }

    /**
     * Returns number of "primary-key-join-column" element
     */
    public int sizeOfPrimaryKeyJoinColumnArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(PRIMARYKEYJOINCOLUMN$0);
        }
    }

    /**
     * Sets array of all "primary-key-join-column" element
     */
    public void setPrimaryKeyJoinColumnArray(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn[] primaryKeyJoinColumnArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(primaryKeyJoinColumnArray, PRIMARYKEYJOINCOLUMN$0);
        }
    }

    /**
     * Sets ith "primary-key-join-column" element
     */
    public void setPrimaryKeyJoinColumnArray(int i, com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn primaryKeyJoinColumn)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn)get_store().find_element_user(PRIMARYKEYJOINCOLUMN$0, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(primaryKeyJoinColumn);
        }
    }

    /**
     * Inserts and returns a new empty value (as xml) as the ith "primary-key-join-column" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn insertNewPrimaryKeyJoinColumn(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn)get_store().insert_element_user(PRIMARYKEYJOINCOLUMN$0, i);
            return target;
        }
    }

    /**
     * Appends and returns a new empty value (as xml) as the last "primary-key-join-column" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn addNewPrimaryKeyJoinColumn()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.PrimaryKeyJoinColumn)get_store().add_element_user(PRIMARYKEYJOINCOLUMN$0);
            return target;
        }
    }

    /**
     * Removes the ith "primary-key-join-column" element
     */
    public void removePrimaryKeyJoinColumn(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(PRIMARYKEYJOINCOLUMN$0, i);
        }
    }

    /**
     * Gets a List of "join-column" elements
     */
    public java.util.List<com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn> getJoinColumnList()
    {
        final class JoinColumnList extends java.util.AbstractList<com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn>
        {
            public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn get(int i)
                { return OneToOneImpl.this.getJoinColumnArray(i); }

            public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn set(int i, com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn o)
            {
                com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn old = OneToOneImpl.this.getJoinColumnArray(i);
                OneToOneImpl.this.setJoinColumnArray(i, o);
                return old;
            }

            public void add(int i, com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn o)
                { OneToOneImpl.this.insertNewJoinColumn(i).set(o); }

            public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn remove(int i)
            {
                com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn old = OneToOneImpl.this.getJoinColumnArray(i);
                OneToOneImpl.this.removeJoinColumn(i);
                return old;
            }

            public int size()
                { return OneToOneImpl.this.sizeOfJoinColumnArray(); }

        }

        synchronized (monitor())
        {
            check_orphaned();
            return new JoinColumnList();
        }
    }

    /**
     * Gets array of all "join-column" elements
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn[] getJoinColumnArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            java.util.List targetList = new java.util.ArrayList();
            get_store().find_all_element_users(JOINCOLUMN$2, targetList);
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn[] result = new com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn[targetList.size()];
            targetList.toArray(result);
            return result;
        }
    }

    /**
     * Gets ith "join-column" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn getJoinColumnArray(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn)get_store().find_element_user(JOINCOLUMN$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            return target;
        }
    }

    /**
     * Returns number of "join-column" element
     */
    public int sizeOfJoinColumnArray()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(JOINCOLUMN$2);
        }
    }

    /**
     * Sets array of all "join-column" element
     */
    public void setJoinColumnArray(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn[] joinColumnArray)
    {
        synchronized (monitor())
        {
            check_orphaned();
            arraySetterHelper(joinColumnArray, JOINCOLUMN$2);
        }
    }

    /**
     * Sets ith "join-column" element
     */
    public void setJoinColumnArray(int i, com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn joinColumn)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn)get_store().find_element_user(JOINCOLUMN$2, i);
            if (target == null)
            {
                throw new IndexOutOfBoundsException();
            }
            target.set(joinColumn);
        }
    }

    /**
     * Inserts and returns a new empty value (as xml) as the ith "join-column" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn insertNewJoinColumn(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn)get_store().insert_element_user(JOINCOLUMN$2, i);
            return target;
        }
    }

    /**
     * Appends and returns a new empty value (as xml) as the last "join-column" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn addNewJoinColumn()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinColumn)get_store().add_element_user(JOINCOLUMN$2);
            return target;
        }
    }

    /**
     * Removes the ith "join-column" element
     */
    public void removeJoinColumn(int i)
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(JOINCOLUMN$2, i);
        }
    }

    /**
     * Gets the "join-table" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable getJoinTable()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable)get_store().find_element_user(JOINTABLE$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }

    /**
     * True if has "join-table" element
     */
    public boolean isSetJoinTable()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(JOINTABLE$4) != 0;
        }
    }

    /**
     * Sets the "join-table" element
     */
    public void setJoinTable(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable joinTable)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable)get_store().find_element_user(JOINTABLE$4, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable)get_store().add_element_user(JOINTABLE$4);
            }
            target.set(joinTable);
        }
    }

    /**
     * Appends and returns a new empty "join-table" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable addNewJoinTable()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.JoinTable)get_store().add_element_user(JOINTABLE$4);
            return target;
        }
    }

    /**
     * Unsets the "join-table" element
     */
    public void unsetJoinTable()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(JOINTABLE$4, 0);
        }
    }

    /**
     * Gets the "cascade" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType getCascade()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType)get_store().find_element_user(CASCADE$6, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }

    /**
     * True if has "cascade" element
     */
    public boolean isSetCascade()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(CASCADE$6) != 0;
        }
    }

    /**
     * Sets the "cascade" element
     */
    public void setCascade(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType cascade)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType)get_store().find_element_user(CASCADE$6, 0);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType)get_store().add_element_user(CASCADE$6);
            }
            target.set(cascade);
        }
    }

    /**
     * Appends and returns a new empty "cascade" element
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType addNewCascade()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.CascadeType)get_store().add_element_user(CASCADE$6);
            return target;
        }
    }

    /**
     * Unsets the "cascade" element
     */
    public void unsetCascade()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(CASCADE$6, 0);
        }
    }

    /**
     * Gets the "name" attribute
     */
    public java.lang.String getName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }

    /**
     * Gets (as xml) the "name" attribute
     */
    public org.apache.xmlbeans.XmlString xgetName()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$8);
            return target;
        }
    }

    /**
     * Sets the "name" attribute
     */
    public void setName(java.lang.String name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(NAME$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(NAME$8);
            }
            target.setStringValue(name);
        }
    }

    /**
     * Sets (as xml) the "name" attribute
     */
    public void xsetName(org.apache.xmlbeans.XmlString name)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(NAME$8);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(NAME$8);
            }
            target.set(name);
        }
    }

    /**
     * Gets the "target-entity" attribute
     */
    public java.lang.String getTargetEntity()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TARGETENTITY$10);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }

    /**
     * Gets (as xml) the "target-entity" attribute
     */
    public org.apache.xmlbeans.XmlString xgetTargetEntity()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TARGETENTITY$10);
            return target;
        }
    }

    /**
     * True if has "target-entity" attribute
     */
    public boolean isSetTargetEntity()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(TARGETENTITY$10) != null;
        }
    }

    /**
     * Sets the "target-entity" attribute
     */
    public void setTargetEntity(java.lang.String targetEntity)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TARGETENTITY$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TARGETENTITY$10);
            }
            target.setStringValue(targetEntity);
        }
    }

    /**
     * Sets (as xml) the "target-entity" attribute
     */
    public void xsetTargetEntity(org.apache.xmlbeans.XmlString targetEntity)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(TARGETENTITY$10);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(TARGETENTITY$10);
            }
            target.set(targetEntity);
        }
    }

    /**
     * Unsets the "target-entity" attribute
     */
    public void unsetTargetEntity()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(TARGETENTITY$10);
        }
    }

    /**
     * Gets the "fetch" attribute
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType.Enum getFetch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(FETCH$12);
            if (target == null)
            {
                return null;
            }
            return (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType.Enum)target.getEnumValue();
        }
    }

    /**
     * Gets (as xml) the "fetch" attribute
     */
    public com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType xgetFetch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType)get_store().find_attribute_user(FETCH$12);
            return target;
        }
    }

    /**
     * True if has "fetch" attribute
     */
    public boolean isSetFetch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(FETCH$12) != null;
        }
    }

    /**
     * Sets the "fetch" attribute
     */
    public void setFetch(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType.Enum fetch)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(FETCH$12);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(FETCH$12);
            }
            target.setEnumValue(fetch);
        }
    }

    /**
     * Sets (as xml) the "fetch" attribute
     */
    public void xsetFetch(com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType fetch)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType target = null;
            target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType)get_store().find_attribute_user(FETCH$12);
            if (target == null)
            {
                target = (com.googlecode.horncomb.orm.jpa.v10.xmlbeans.FetchType)get_store().add_attribute_user(FETCH$12);
            }
            target.set(fetch);
        }
    }

    /**
     * Unsets the "fetch" attribute
     */
    public void unsetFetch()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(FETCH$12);
        }
    }

    /**
     * Gets the "optional" attribute
     */
    public boolean getOptional()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(OPTIONAL$14);
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }

    /**
     * Gets (as xml) the "optional" attribute
     */
    public org.apache.xmlbeans.XmlBoolean xgetOptional()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(OPTIONAL$14);
            return target;
        }
    }

    /**
     * True if has "optional" attribute
     */
    public boolean isSetOptional()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(OPTIONAL$14) != null;
        }
    }

    /**
     * Sets the "optional" attribute
     */
    public void setOptional(boolean optional)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(OPTIONAL$14);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(OPTIONAL$14);
            }
            target.setBooleanValue(optional);
        }
    }

    /**
     * Sets (as xml) the "optional" attribute
     */
    public void xsetOptional(org.apache.xmlbeans.XmlBoolean optional)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(OPTIONAL$14);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(OPTIONAL$14);
            }
            target.set(optional);
        }
    }

    /**
     * Unsets the "optional" attribute
     */
    public void unsetOptional()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(OPTIONAL$14);
        }
    }

    /**
     * Gets the "mapped-by" attribute
     */
    public java.lang.String getMappedBy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MAPPEDBY$16);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }

    /**
     * Gets (as xml) the "mapped-by" attribute
     */
    public org.apache.xmlbeans.XmlString xgetMappedBy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(MAPPEDBY$16);
            return target;
        }
    }

    /**
     * True if has "mapped-by" attribute
     */
    public boolean isSetMappedBy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(MAPPEDBY$16) != null;
        }
    }

    /**
     * Sets the "mapped-by" attribute
     */
    public void setMappedBy(java.lang.String mappedBy)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(MAPPEDBY$16);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(MAPPEDBY$16);
            }
            target.setStringValue(mappedBy);
        }
    }

    /**
     * Sets (as xml) the "mapped-by" attribute
     */
    public void xsetMappedBy(org.apache.xmlbeans.XmlString mappedBy)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(MAPPEDBY$16);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(MAPPEDBY$16);
            }
            target.set(mappedBy);
        }
    }

    /**
     * Unsets the "mapped-by" attribute
     */
    public void unsetMappedBy()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(MAPPEDBY$16);
        }
    }
}
